package com.itheima.api.generic.demo06;

import java.util.ArrayList;
import java.util.List;

public class GenericDemo06 {

    public static void main(String[] args) {

        List<String> list = new ArrayList<String>();
        list.add("蓝愿");
        list.add("蓝思追");
//        show(list);
        show1(list);
    }

    public static void show(List<Object> obj){

        obj.forEach((Object s) -> {
            System.out.println(s);
        });
    }

    public static void show1(List<String> stringList){

        stringList.forEach((String s) -> {
            System.out.println(s);
        });
    }
}
